<?php
/* @var $this CursosController */
/* @var $model Cursos */
/* @var $form bootstrap.widgets.TbActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'cursos-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of bootstrap.widgets.TbActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Los campos con <span class="required">*</span> son obligatorios.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'Periodo Lectivo'); ?>
		<?php echo $form->dropDownList($model,'id_periodo', CHtml::listData(Periodoslectivos::model()->findAll(),'id_periodo', 'display')); ?>
		<?php echo $form->error($model,'id_periodo'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Nombre de la Materia'); ?>
		<?php echo $form->dropDownList($model,'id_materia', CHtml::listData(Materias::model()->findAll(), 'id_materia', 'nombre')); ?>
		<?php echo $form->error($model,'id_materia'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Nombre de la sección'); ?>
		<?php echo $form->textField($model,'seccion',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'seccion'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->